﻿<%@ Page Title="Strategic Asset Management Las Vegas: Global Grid" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="GlobalGrid.aspx.cs" Inherits="LenderClearingHouse.GlobalGrid" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="ListFilterControl.ascx" TagName="ListFilterControl" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageHeader" runat="server">
  Global Grid
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
  <telerik:RadWindowManager runat="server" Behavior="Default" InitialBehavior="None"
        ID="RadWindowManager1" Modal="True" Behaviors="Resize, Close, Move" ReloadOnShow="True"
        ShowContentDuringLoad="False" VisibleStatusbar="False" VisibleTitlebar="False"
        Width="500px">
  </telerik:RadWindowManager>

  <script type="text/javascript">
    function SaveAsView() {
      var oWnd = radopen("SaveViewAsDialog.aspx", "RadWindow1");
      oWnd.setSize(600, 200);
      oWnd.Center();
      return false;
    }

    function RefreshForm() {
      __doPostBack("<%= btnSaveViewAs.UniqueID %>", "RefreshSaveAs")
    }
  </script>

    <uc1:listfiltercontrol id="listFilter" runat="server" />
    <div class="blank_list1">
    </div>
    <!--Blank List Ends-->

    <div class="panel7">
        <table width="100%" cellpadding="5px" cellspacing="0" border="0">
          <tr>
            <td width="100px">
              <asp:Button ID="btnSaveView" runat="server" Text="Save View" OnClick="btnSaveView_Click" />
            </td>
            <td width="150px">
              <asp:Button ID="btnSaveViewAs" runat="server" Text="Save View As..." OnClientClick="return SaveAsView();" />
            </td>
            <td width="400px">
              Load View:&nbsp;
              <asp:DropDownList ID="ddlNameSettings" runat="server" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="ddlNameSettings_SelectedIndexChanged"></asp:DropDownList>&nbsp;
            </td>
            <td>
              <asp:Button ID="btnDeleteView" runat="server" Text="Delete Current View" 
                OnClientClick='return confirm("Are you sure you want to delete this view?");' OnClick="btnDeleteView_Click" />
            </td>
          </tr>
        </table>
    </div>

    <!--Panel Seven: "Grid Area"-->
    <div class="panel7" runat="server" id="pnlLvreo"><p>
        <div style="float:left"><asp:CheckBox ID="chkLvreo" runat="server" AutoPostBack="true" OnCheckedChanged="chkLvreo_OnCheckedChanged" />LVREO Master List&nbsp;
        <asp:CheckBox ID="chkFinancial" runat="server" AutoPostBack="true" OnCheckedChanged="chkFinancial_OnCheckedChanged" />Financial Analysis&nbsp;
        <asp:CheckBox ID="chkEscrow" runat="server" AutoPostBack="true" OnCheckedChanged="chkEscrow_OnCheckedChanged" />Escrow&nbsp;
        <asp:CheckBox ID="chkRehab" runat="server" AutoPostBack="true" OnCheckedChanged="chkRehab_OnCheckedChanged" />Rehab</div>
        <div style="float:right">
            <table>
                <tr>
                    <td valign="middle">
                            <img src="images/excel_icon.png"/>
                    </td>
                    <td valign="middle">
                        <asp:LinkButton ID="LinkButton1" CssClass="link1" runat="server" Text="Export&nbsp;To&nbsp;Excel" onclick="lnkExportToExcel_Click"></asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div></p>
        <br /><br /><asp:PlaceHolder runat="server" ID="phLvreoGrid"></asp:PlaceHolder>        
    </div>

    <asp:SqlDataSource ID="dsLvreo" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>"
        SelectCommand="getLvreo_List" SelectCommandType="StoredProcedure" 
        CancelSelectOnNullParameter="False" onselecting="dsLvreo_Selecting">
            <SelectParameters>
                <asp:Parameter ConvertEmptyStringToNull="False" Name="Apn" Type="String" />
                <asp:Parameter ConvertEmptyStringToNull="False" Name="PropLocation" Type="String" />
                <asp:Parameter ConvertEmptyStringToNull="False" Name="Zip" Type="String" />
            </SelectParameters>
    </asp:SqlDataSource>
    
    <telerik:RadAjaxManager ID="radAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gridEscrow">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gridEscrow" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
